package com.ruoyi.slope.api.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.api.mapper.SlopeAiPhotoMapper;
import com.ruoyi.slope.api.domain.SlopeAiPhoto;
import com.ruoyi.slope.api.service.ISlopeAiPhotoService;

/**
 * 落石监测图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-27
 */
@Service
public class SlopeAiPhotoServiceImpl implements ISlopeAiPhotoService 
{
    @Autowired
    private SlopeAiPhotoMapper slopeAiPhotoMapper;

    /**
     * 查询落石监测图片
     * 
     * @param id 落石监测图片主键
     * @return 落石监测图片
     */
    @Override
    public SlopeAiPhoto selectSlopeAiPhotoById(Long id)
    {
        return slopeAiPhotoMapper.selectSlopeAiPhotoById(id);
    }

    /**
     * 查询落石监测图片列表
     * 
     * @param slopeAiPhoto 落石监测图片
     * @return 落石监测图片
     */
    @Override
    public List<SlopeAiPhoto> selectSlopeAiPhotoList(SlopeAiPhoto slopeAiPhoto)
    {
        return slopeAiPhotoMapper.selectSlopeAiPhotoList(slopeAiPhoto);
    }

    /**
     * 新增落石监测图片
     * 
     * @param slopeAiPhoto 落石监测图片
     * @return 结果
     */
    @Override
    public int insertSlopeAiPhoto(SlopeAiPhoto slopeAiPhoto)
    {
        slopeAiPhoto.setCreateTime(DateUtils.getNowDate());
        return slopeAiPhotoMapper.insertSlopeAiPhoto(slopeAiPhoto);
    }

    /**
     * 修改落石监测图片
     * 
     * @param slopeAiPhoto 落石监测图片
     * @return 结果
     */
    @Override
    public int updateSlopeAiPhoto(SlopeAiPhoto slopeAiPhoto)
    {
        slopeAiPhoto.setUpdateTime(DateUtils.getNowDate());
        return slopeAiPhotoMapper.updateSlopeAiPhoto(slopeAiPhoto);
    }

    /**
     * 批量删除落石监测图片
     * 
     * @param ids 需要删除的落石监测图片主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiPhotoByIds(Long[] ids)
    {
        return slopeAiPhotoMapper.deleteSlopeAiPhotoByIds(ids);
    }

    /**
     * 删除落石监测图片信息
     * 
     * @param id 落石监测图片主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiPhotoById(Long id)
    {
        return slopeAiPhotoMapper.deleteSlopeAiPhotoById(id);
    }
}
